#ifndef _X_SERVICE_H
#define _X_SERVICE_H
#include "xDef.h"
#include <iostream>
namespace xNet
{
    NET_ENGINE_CORE_API class xService
    {
        public: 
            xService(std::string strIp,uint16 wPort);
        public:
            void Main();
            void Finish();
        public:
            virtual bool Init(){ return true; }
            virtual bool ServiceCallBack() = 0;
        private:
            MACRO_PROPERTY_DEF(uint16,m_wPort,Port)
            MACRO_PROPERTY_DEF(std::string,m_strIp,Ip)
            MACRO_PROPERTY_DEF(bool,m_bTermination,Termination)
    };
}

#endif